package org.xiaoyu.rpc.remoting.transport.server;

import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;
import lombok.extern.slf4j.Slf4j;
import org.xiaoyu.rpc.remoting.packet.HeartbeatRequest;

/**
 * Created By Have
 * 2021/7/21 20:38
 */
@Slf4j
@ChannelHandler.Sharable
@Deprecated
public class ServerHeartbeatHandler extends SimpleChannelInboundHandler<HeartbeatRequest> {
    public static final ServerHeartbeatHandler INSTANCE = new ServerHeartbeatHandler();

    @Override
    protected void channelRead0(ChannelHandlerContext ctx, HeartbeatRequest msg) throws Exception {
        if (log.isDebugEnabled()) {
            log.debug("Just receive heartbeat from :[{}]", ctx.channel().remoteAddress());
        }
    }
}
